package com.yanqu.road.server.cmd.activity.langyamemorial;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.LangYaMemorialProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.langyamemorial.CrossLangYaMemorialMgr;
import com.yanqu.road.server.manager.activity.langyamemorial.LangYaMemorialActivity;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_LANGYA_MEMORIAL_GET_ALL_BUILD_VALUE, desc = "获取建阁进度")
public class CrossLangYaMemorialGetAllBuildValueCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        LangYaMemorialProto.CrossLangYaMemorialGetAllMakeNumMgs reqMsg = LangYaMemorialProto.CrossLangYaMemorialGetAllMakeNumMgs.parseFrom(packet.getBytes());
        LangYaMemorialActivity activity = CrossLangYaMemorialMgr.getLangYaMemorialActivity(reqMsg.getActivityId());
        if(activity != null){
            activity.syncAllBuildProcess(serverId);
        }
    }

    @Override
    public void sendData() {

    }
}
